/*
day68
2019.11.4
*/
#include<math.h>
struct TreeNode{
	int val;
	struct TreeNode *left;
	struct TreeNode *right;
};

void help(struct TreeNode *root,int pre[],int min[])
{
	if(!root) return ;
	help(root->left,pre,min);
	
	int cur=abs(root->val-pre[0]);
	if(cur<min[0]) min[0]=cur;
	pre[0]=root->val;
	
	help(root->right,pre,min);
}

int minDiffInBST(struct TreeNode* root){
	
	int min[]={200};
	int pre[]={200};
	help(root,pre,min);
	return min[0];
}


int main()
{
	return 0;
}
